package Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;

class Stu{
    int id;
    String name;
}
public class Test09 {
    public static void main1(String[] args) {
        ConcurrentHashMap<Integer,Integer> con = new ConcurrentHashMap<>();
        //value值也不能插入null
//        con.put(1,null);
        //不存在1这一组数据,返回的就是null
        System.out.println(con.get(1));
    }

    public static void main2(String[] args) {
        HashMap<Integer,Integer> hashMap = new HashMap<>();
        System.out.println(hashMap.get(1));
        System.out.println(hashMap.containsKey(1));
    }

    public static void main(String[] args) {
        int[] arr = new int[]{4,10,4,3,8,9};
//        int a = 3f3f3f3f;
//        Arrays.fill(arr,(float)3f3f3f3f);
        int ret = lengthOfLIS(arr);
        System.out.println(ret);
    }
    public static int lengthOfLIS(int[] nums) {
        int n = nums.length;
        int[] arr = new int[n+1];
        int m = 1;
        Arrays.fill(arr,Integer.MAX_VALUE);
        for(int i = 0;i<n;i++){
            if(nums[i] < arr[m]) arr[m] = nums[i];
            else if(nums[i] > arr[m]) {
                m++;
                arr[m] = nums[i];
            }
        }
        return m;
    }
}
